cmake_minimum_required(VERSION 3.8)
PROJECT(Crush-Chess)

SET(CMAKE_CXX_STANDARD 17)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)

SET(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic")

INCLUDE_DIRECTORIES(Inc)

FILE(GLOB SRC_FILES Src/*.c)
ADD_EXECUTABLE(Crush-Chess ${SRC_FILES})

# target_compile_options(C-CHESS PRIVATE -fexec-charset=GBK)

TARGET_LINK_LIBRARIES(Crush-Chess allegro allegro_font allegro_ttf allegro_image 
allegro_primitives allegro_audio allegro_acodec allegro_color
)

add_custom_target(copy_directory ALL
    COMMAND ${CMAKE_COMMAND} -E copy_directory
        ${CMAKE_SOURCE_DIR}/res
        ${CMAKE_BINARY_DIR}/res
)